import { ESApp } from '@extscreen/es3-vue'
import application from './App.vue'

import routes from './routes'

const routerOptions = {
  main: 'demo', // 程序入口
  error: 'error',
  limit: 10,
  routes: routes
}

import { createESApp } from '@extscreen/es3-core'

const app: ESApp = createESApp(application, routerOptions)

import { ESComponent } from '@extscreen/es3-component'

app.use(ESComponent)

import '@quicktvui/quicktvui3/dist/index.css'
import { QuickTVUI } from '@quicktvui/quicktvui3'

app.use(QuickTVUI)

// 播放器
import { createESPlayer } from '@extscreen/es3-player'

const player = createESPlayer()
app.use(player)

import { createESPlayerManager } from '@extscreen/es3-player-manager'

const playerManager = createESPlayerManager()
app.use(playerManager)

import { createESVideoPlayer } from '@extscreen/es3-video-player'

const videoPlayer = createESVideoPlayer()
app.use(videoPlayer)

//---------------------------网络请求----------------------------------
import { createRequestManager, RequestManager } from './api/request/RequestManager'
const requestManger: RequestManager = createRequestManager()
app.use(requestManger)
//---------------------------网络接口----------------------------------
import { IGlobalApi } from './api/IGlobalApi'
import { createGlobalApi } from './api/GlobalApiImpl'
const appApi: IGlobalApi = createGlobalApi()
app.use(appApi)
